import instance from '../../axios.service';
import {ApplyItem, ApplyStatus, ResDto} from "../../types/common";
import {basePath} from '../config'
export default {
    getList: (data: {pageIndex: number, pageSize: number, applyAccountId: string | undefined, status: ApplyStatus}): Promise<ResDto> => instance.post(`${basePath}/apply-admin/apply/list`, data),// 申请列表
    add: (data: ApplyItem): Promise<ResDto> => instance.post(`${basePath}/apply-admin/apply/add`, data),// 创建申请
    cancel: (id: string): Promise<ResDto> => instance.post(`${basePath}/apply-admin/apply/cancel`, {id}),// 取消申请
    detail: (id: string): Promise<ResDto> => instance.get(`${basePath}/apply-admin/apply/detail?id=${id}`, ),// 申请详情
    getDevicePlan: (deviceSn: string): Promise<ResDto> => instance.get(`${basePath}/apply-admin/apply/device-plan?deviceSn=${deviceSn}`, ),// 查询设备的所有申请计划

}
